package com.walle.concurrenttest.waitnotify;

/**
 * @author zhangjiapeng
 * @Package com.walle.concurrenttest.waitnotify
 * @Description: ${todo}
 * @date 2019/2/27 14:29
 */
public class PrintThread implements Runnable{

    private char c;

    private char next;

    private PrintABC printABC;

    public PrintThread(char c, char next, PrintABC printABC) {
        this.c = c;
        this.next = next;
        this.printABC = printABC;
    }


    @Override
    public void run() {
        while (true){
            printABC.print(c);
            printABC.setNext(next);
        }
    }
}
